//
//  PlayViewController.swift
//  ShouChong
//
//  Created by yw on 2024/7/26.
//

import UIKit
import SwiftUI

class PlayViewController: BaseViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        NotificationCenter.default.addObserver(self, selector: #selector(uploadUserActionNotify), name: NSNotification.Name("uploadUserActionNotify"), object: nil)
        setupUI()
    }
    
    private func setupUI() {
        self.title = "撸了么"
        let hostVC = UIHostingController(rootView: PlayView())
        hostVC.view.backgroundColor = UIColor(named: "color_bg")
        hostVC.view.frame = kScreenBounds
        self.view.addSubview(hostVC.view)
    }
    

    @objc func uploadUserActionNotify() {
        self.navigationController?.popViewController(animated: true)
    }
    
    deinit {
        DPrint("PlayViewController死了")
        NotificationCenter.default.removeObserver(self)
    }

}
